<span page-title ng-model="contentView">{{ 'New Filter for Content View:' | translate }} {{ contentView.name }}</span>

<h3 ng-show="stateIncludes('content-view.yum')" translate>Add New Yum Filter</h3>
<h3 ng-show="stateIncludes('content-view.docker')" translate>Add New Container Image Tag Filter</h3>

<div class="row">
  <div class="col-sm-5">
    <form name="filterForm" role="form" novalidate>
      <div bst-form-group label="{{ 'Name' | translate }}">
        <input id="name"
               name="name"
               ng-model="filter.name"
               type="text"
               tabindex="1"
               autofocus
               required/>
      </div>

      <div bst-form-group ng-show="filterChoices.length > 1" label="{{ 'Content Type' | translate }}">
        <select id="type"
                name="type"
                ng-model="filter.type"
                ng-options="filterChoice.id as filterChoice.name for filterChoice in filterChoices"
                tabindex="2"
                required>
        </select>
      </div>

      <div bst-form-group label="{{ 'Inclusion Type' | translate }}">
        <select id="inclusion"
                name="inclusion"
                ng-model="filter.inclusion"
                tabindex="3"
                required>
          <option value="true" translate>Include</option>
          <option value="false" translate>Exclude</option>
        </select>
      </div>

      <div bst-form-group label="{{ 'Description' | translate }}">
    <textarea id="description"
              name="description"
              ng-model="filter.description"
              tabindex="3">
    </textarea>
      </div>

      <div bst-form-buttons
           on-cancel="transitionTo('content-view.yum.filters', {contentViewId: contentView.id})"
           on-save="save(filter, contentView)"
           ng-show="stateIncludes('content-view.yum')"
           working="working">
      </div>
      <div bst-form-buttons
           on-cancel="transitionTo('content-view.docker.filters', {contentViewId: contentView.id})"
           on-save="save(filter, contentView)"
           ng-show="stateIncludes('content-view.docker')"
           working="working">
      </div>
    </form>
  </div>
</div>
